/* PTZ控制组件样式 */
.ptz-controls {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  max-width: 500px;
  margin: 16px 0;
}

.ptz-controls.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.ptz-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #343a40;
  text-align: center;
}

.ptz-main-controls {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: flex-start;
}

/* 方向控制区域 */
.ptz-direction-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.control-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 20px;
}

.control-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #007bff;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.control-btn:hover {
  background: #e3f2fd;
  transform: scale(1.05);
}

.control-btn.active {
  background: #007bff;
  color: white;
}

.control-btn.active .control-icon {
  color: white;
}

.control-icon {
  font-size: 18px;
  font-weight: bold;
  color: #007bff;
}

.control-top {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.control-bottom {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.control-left {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.control-right {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.control-round {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  border: 2px solid #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-round-inner {
  font-size: 16px;
  color: #007bff;
}

.control-inner-btn {
  display: none; /* 简化版本不显示内部按钮 */
}

/* 速度控制 */
.speed-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 120px;
}

.speed-control label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.speed-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #dee2e6;
  outline: none;
  appearance: none;
}

.speed-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
}

.speed-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: none;
}

/* 功能控制区域 */
.ptz-function-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.function-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.function-title {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  text-align: center;
}

.function-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.function-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #ffffff;
  color: #495057;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.function-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.function-btn:active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.function-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.function-btn:disabled:hover {
  background: #ffffff;
  border-color: #dee2e6;
  color: #495057;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .ptz-main-controls {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .ptz-function-controls {
    align-items: center;
  }
  
  .function-buttons {
    flex-wrap: wrap;
  }
}

/* 动画效果 */
@keyframes controlPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.control-btn:active {
  animation: controlPress 0.1s ease;
}

.function-btn:active {
  animation: controlPress 0.1s ease;
}